<%-- 
    Document   : wall
    Created on : 26 janv. 2013, 12:21:48
    Author     : gabrielle
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Iterator"%>
<%@page import="models.Messenger"%>
<%@page import="buisness.Messages"%>
<%@page import="javax.security.auth.message.callback.PasswordValidationCallback"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page errorPage="error.jsp" %>
<!DOCTYPE html>
<html>
    <%@include file="WEB-INF/jspf/head.jspf"%>   
    <body>
        <%@include file="WEB-INF/jspf/header.jspf"%>
        <div class="page">
            <div class="content">
                <p><a href="./messages">News</a>
                <a href="./friends">Friends</a>
                <a href="./logout">Logout</a>
                </p>
                <p><form action="./messages" method="post">
                    <input type="text" name="body" title="Enter your message"/>
                    <input type="submit" value="Submit"/>
                </form></p>
                
                <% 
                    request.getSession(true).setAttribute("type", "news");
                    ArrayList<Messenger> allMessenger=new ArrayList();
                    allMessenger = (ArrayList) request.getSession().getAttribute("Messengers");
                    for (Messenger mail : allMessenger)
                    {
                         %><p><%out.println(mail.getBody());%></p><%
                    }

                %>
            </div>
        </div>
        <%@include file="WEB-INF/jspf/footer.jspf"%>  
    </body>
</html>
